(function() {
	var jsFn = (function() {
			var scripts = document.getElementsByTagName("script");
			for(var i=0,l=scripts.length;i<l;i++) {
				var o = scripts[i].src;
				if(o&&/pubHeader/.test(o)) return scripts[i];
			}
			return false;
		})(),
		d        = window.HQHEADR_CSSPATH || '',
		sloganV,hqAd,
		htmlCose = (function() {
		var cla = sloganV!="h"?'navTopSec':'';
		var html = '<div class="topIndex">';
		html += '<div class="hdTop">';
		html += '<div class="hdTopCon '+cla+'">';
		html += '<div class="leftNavSec">';
		var s = slogan();
	
		html += !s?'<a href="http://www.huanqiu.com/" target="_blank" class="linkHome"><i class="iconHomeSec"></i>环球网首页</a>':s;
		html += '</div>';
	
		if(sloganV!="h") {
			html += '<span class="hdtMenu ui-topMenu" id="hdtMenu">';
			html += '<div style="width:115px;height:40px;" onclick="window.location=\'http://www.huanqiu.com/\'"></div><em class="hdtmArr"></em>';
			html += '<div class="hdtmList" id="hdtmList">';
			html += '<ul>';
			html += '<li>';
			html += '<ul class="hdtmSubList">';
			html += '<li><a href="../../../../world.huanqiu.com/index.htm"/*tpa=http://world.huanqiu.com/*/ target="_blank">国际</a></li><li><a href="http://mil.huanqiu.com/" target="_blank">军事</a></li><li><a href="http://china.huanqiu.com/" target="_blank">国内</a></li><li><a href="http://society.huanqiu.com/" target="_blank">社会</a></li><li><a href="http://taiwan.huanqiu.com/" target="_blank">台海</a></li><li><a href="http://opinion.huanqiu.com/" target="_blank">评论</a></li><li><a href="http://look.huanqiu.com/" target="_blank">博览</a></li><li><a href="http://photo.huanqiu.com/" target="_blank">图片</a></li>';
			html += '</ul>';
			html += '</li>';
			html += '<li>';
			html += '<ul class="hdtmSubList">';
			html += '<li><a href="http://finance.huanqiu.com/" target="_blank">财经</a></li><li><a href="http://tech.huanqiu.com/" target="_blank">科技</a></li><li><a href="http://auto.huanqiu.com/" target="_blank">汽车</a></li><li><a href="http://tech.huanqiu.com/digi/" target="_blank">数码</a></li><li><a href="http://lx.huanqiu.com/" target="_blank">留学</a></li><li><a href="http://smart.huanqiu.com/" target="_blank">智能</a></li>';
			html += '</ul>';
			html += '</li>';
			html += '<li>';
			html += '<ul class="hdtmSubList">';
			html += '<li><a href="http://ent.huanqiu.com/" target="_blank">娱乐</a></li><li><a href="http://fashion.huanqiu.com/" target="_blank">时尚</a></li><li><a href="http://sports.huanqiu.com/" target="_blank">体育</a></li><li><a href="http://go.huanqiu.com/" target="_blank">旅行</a></li><li><a href="http://health.huanqiu.com/" target="_blank">健康</a></li><li><a href="http://hope.huanqiu.com/" target="_blank">公益</a></li><li><a href="http://women.huanqiu.com/" target="_blank">女人</a></li><li><a href="http://v.huanqiu.com/" target="_blank">视频</a></li>';
			html += '</ul>';
			html += '</li>';
			html += '<li class="noBor">';
			html += '<ul class="hdtmSubList">';
			html += '<li><a href="http://history.huanqiu.com/" target="_blank">历史</a></li><li><a href="http://run.huanqiu.com/" target="_blank">跑步</a></li><li><a href="http://ski.huanqiu.com/" target="_blank">滑雪</a></li><li><a href="http://bbs.huanqiu.com/" target="_blank">论坛</a></li><li style="width:86px"><a href="http://uav.huanqiu.com/" target="_blank">无人机</a></li><li style="width:86px"><a href="http://finance.huanqiu.com/br/" target="_blank">一带一路</a></li><li style="width:86px"><a href="http://oversea.huanqiu.com/" target="_blank">海外看中国</a></li>';
			html += '</ul>';
			html += '</li>';
			html += '</ul>';
			html += '</div>';
			html += '</span>';
		}
		
		
		html += '<div id="hdBefore" class="hdBefore ui-loginBefore" style="">';
		html += '<a href="http://i.huanqiu.com/register" target="_blank" class="hdtReg">注册</a><span class="hdtLogin ui-topLogin"><div class="hdtLogBoxWrap"><a href="http://i.huanqiu.com/" class="btnLogin" style="color:#fff;" target="_self">登录</a></div></span>';
		html += '</div>';
		html += '<div id="hdLogged" class="hdLogged ui-loginAfter" style="display: none;">';
		html += '<a href="http://i.huanqiu.com/logout" target="_self" class="hdtExit">退出</a><a href="http://i.huanqiu.com/center/" target="_blank" id="hdtName" class="hdtName ui-username"></a><span class="hdtWel">欢迎你</span>';
		html += '</div></div></div></div>';
		return html;
	})(),
		cssCode  = (function() {
			var css = '.hdTop p,.hdTop ul,.hdTop li {margin:0;padding:0;list-style:none;overflow:hidden;display:block;}';
			css += '.hdTop em { font-style:normal;}';
			css += '.hdTop .hdtMsg,.hdTop .hdtMail,.hdTop .hdtMail u,.hdTop .hdtMenu .hdtmArr{ background:url(http://himg2.huanqiu.com/statics/hq2013/images/topLogin/icon.png) no-repeat;}';
			css += '.hdTop .hdtMenu,.htdLogBtnb,.onError{ background:url(http://himg2.huanqiu.com/statics/hq2013/images/topLogin/logoAct.png) no-repeat;}';
			css += '.coHead{height:289px; border-bottom:1px solid #fff; position:relative; border-bottom:1px solid #fff; background-position:center 41px;}';
			css += '.hdTop{ height:40px; background:#434343;font-size: 12px;}';
			css += '.hdTopCon{ width:970px;height:40px;  margin:0 auto;}';
			css += '.hdLogged{ display:inline-block; float:right;}';
			css += '.hdTop a{ text-decoration:none;}';
			css += '.hdTop .hdtExit,.hdTop .hdtMail,.hdTop .hdtMsg,.hdTop .hdtMenu,.hdTop .hdtLogin{ cursor:pointer;}';
			css += '.hdTop .hdtName{cursor: auto;}';
			css += '.hdTop .hdtExit:hover ,.hdTop .hdtMail:hover ,.hdTop .hdtMsg:hover ,.hdTop .hdtMenu:hover ,.hdTop .hdtReg:hover { background-color:#676767;}';
			css += '.hdTop .hdtMenu:hover .hdtmList {display:block;}';
			
			
			css += '.hdTop .hdtWel,.hdTop .hdtName,.hdTop .hdtExit,.hdTop .hdtLogin,.hdTop .hdtReg{text-align:center; line-height:40px; color:#fff;}';
			css += '.hdTop .hdtWel{ display:block; float:right; width:45px; height:40px; }';
			css += '.hdTop .hdtName{ display:inline-block; float:right;height:40px; background:#4e4e4e;margin-left:8px; padding:0 20px;}';
			css += '.hdTop .hdtNameLink{display:inline-block; float:right;height:40px; line-height:40px; background:#4e4e4e;margin-left:8px; padding:0 20px; cursor:pointer; color:#fff;}';
			css += '.hdTop .hdtNameLink:hover{ background:#676767;}';
			css += '.hdTop .hdtExit{ display:block; float:right; width:40px;height:40px;margin-left:2px;}';
			css += '.hdTop .hdtMail{ display:block; float:right; width:40px;height:40px; position:relative;margin-left:2px; background-position:12px -1083px;z-index:9999;}';
			css += '.hdTop .hdtMail i{ display:block; width:40px;height:45px; position:absolute; top:0px; left:0px; bottom:-5px; background:#917347;}';
			css += '.hdTop .hdtMail i u{ display:block; width:40px;height:13px; background-position:12px -1128px; margin:10px 0 4px 0;}';
			css += '.hdTop .hdtMail i em{ display:block;width:40px; height:10px; color:#ffffff; font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:center;}';
			css += '.hdTop .hdtMsg{ display:block; float:right; width:40px;height:40px;margin-left:2px; background-position:13px -1045px;}';
			css += '.hdTop .hdtMenu{ display:block; float:right; width:115px;height:40px; margin-left:2px; background-position:20px -48px; position:relative; background-color: #4e4e4e;z-index:9999;}';
			css += '.hdTop .hdtMenu .hdtmArr{ display:block; width:13px; height:13px; position:absolute; top:14px; right:13px; background-position:0 -1368px;}';
			css += '.hdTop .hdtMenu:hover .hdtmArr{ background-position:0 -1398px;}';
			css += '.hdTop .hdtMCur,.hdTop .hdtMCur:hover { background-color:#9a9a9a;}';
			css += '.hdTop .hdtMCur .hdtmArr{ background-position:0 -1398px;}';
			css += '.hdtmList{ width:115px; padding-bottom:10px; position:absolute; top:39px; left:0px; background:#9a9a9a; box-shadow:0px 2px 3px #040000; display:none; z-index:99999999999;  overflow:hidden; padding-top:10px;}';
			css += '.hdtmList li{ border-bottom:1px solid #afafaf; width:87px; margin:0 5px; overflow:hidden; padding:4px 9px;}';
			css += '.hdtmList li.noBor{ border:none!important;}';
			css += '.hdtmList a{ color:#fefefe; display:block; height:25px; text-indent:0; font-size:14px; line-height:25px;}';
			css += '.hdtmList a:hover { background:#8c8c8c; color:#fff;}';
			css += '.hdtMCur .hdtmList{ display:block;}';
			css += '.hdtmSubList li{ border:none; width:43px; float:left; margin:0px; padding:0;}';
			css += '.hdtmSubList li a{ text-indent:0px; text-align:center;}';
			css += '.hdtmSubList li.hdtmLong{ width:100%; letter-spacing:6px;}';
			css += '.hdtmSubList li.hdtmLong a{ text-align:right;}';
			css += '.hdTop .hdtLogin{ display:block; float:right;  height:40px; line-height:40px; color:#fff;position:relative;z-index:9999;}';
			css += '.hdTop .hdtLogin .hdtLogBoxWrap{ background:#917347; height:45px;width:62px;}';
			css += '.hdTop .hdtLogin .hdtLogBoxWrap a {display:block;width:100%;height:100%;}';
			css += '.hdTop .hdtReg{ display:block; float:right; padding:0 19px; height:40px;}';
			css += '.hdtLogBox{ width:240px; height:210px; background:#fff; border-top:3px solid #917347; position:absolute; left:-91px; top:42px; display:none;}';
			css += '.hdtLogInner{ margin:20px 30px; display:block; text-align:left;}';
			css += '.hdtLogBox .hdtLogTit{ color:#5e5e5e; line-height:24px; margin-bottom:4px; cursor:default;}';
			css += '.hdtLogLine{ width:180px; overflow:hidden; height:30px; margin-bottom:8px;}';
			css += '.hdtLogLine input{ width:178px; height:28px; border:1px solid #dddddd; color:#2b2b2b; text-indent:7px;}';
			css += '.hdtLogLine input:-moz-placeholder { color: #2b2b2b; }';
			css += '.hdtLogLine input::-webkit-input-placeholder { color:#2b2b2b; }';
			css += '.hdtLogAbout{ width:180px; overflow:hidden; line-height:24px; margin:-4px 0 8px 0;}';
			css += '.hdtLogAbout label{ float:left; color:#5e5e5e;}';
			css += '.hdtLogAbout label input{ float:left; margin:5px 5px 0 0;}';
			css += '.forgetPass{ color:#00518a; float:right;}';
			css += '.htdLogBtnWrap{ width:100%; overflow:hidden; clear:both;}';
			css += '.htdLogBtnb{ display:block; width:180px; height:30px; overflow:hidden; border:none; background-position:0 -99px; text-indent:-99999px; cursor:pointer;}';
			css += '.onError .htdLogBtnb{ background-position:0 -135px;}';
			css += '.leftNavSec { display:block; float:left; text-align:left;}';
			css += '.leftNavSec a { height:39px; line-height:39px; float:left; position:relative; color:#cacaca;}';
			css += '.leftNavSec a:hover { background:#676767; text-decoration:none;}';
			css += '.leftNavSec span { height:39px; line-height:39px; float:left; position:relative; color:#cacaca; margin:0 1px; display:block; padding:0 5px; font-size:12px;}';
			css += '.leftNavSec a {height: 39px;line-height: 39px;float: left;position: relative;color: #cacaca;}';
			css += '.linkHome {background: #4e4e4e;font-weight: bold;padding: 0 15px 0 32px;}';
			css += '.iconHomeSec {background: url(http://himg2.huanqiu.com/statics/hq2013/images/common/icon.png) no-repeat  0 -85px;width: 12px;height: 12px;position: absolute;left: 15px;top: 13px;}';
			css += '.navTopSec .leftNavSec { display:block; float:left; text-align:left;}';
			css += '.navTopSec .leftNavSec a { height:39px; line-height:39px; float:left; position:relative; color:#cacaca;}';
			css += '.navTopSec .leftNavSec .items{padding: 0 5px;margin: 0 1px;}';
			css += '.navTopSec .leftNavSec a:hover { background:#676767; text-decoration:none;}';
			css += '.navTopSec .leftNavSec .linkWhite { color:#fff; background:none;}';
			css += '.navTopSec .leftNavSec span { height:39px; line-height:39px; float:left; position:relative; color:#cacaca; margin:0 1px; display:block; padding:0 5px; font-size:12px;}';
			css += '.navTopSec .arrPad { background:#4e4e4e;}';
			css += '.navTopSec .arrShow { background:#676767;}';
			css += '.navTopSec .popListSec { display:none;}';
			css += '.navTopSec .arrPad em { display:inline-block; height:39px; font-style:normal; float:left; color:#cacaca;}';
			css += '.navTopSec .arrPad i { display:inline-block; width:15px; height:39px; float:left;}';
			css += '.navTopSec .arrPad i { background:url(http://himg2.huanqiu.com/statics/hq2013/images/index/arrGray.png) no-repeat;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\'../../hq2013/images/index/arrGray.png\'/*tpa=http://himg2.huanqiu.com/statics/hq2013/images/index/arrGray.png*/);_background: none;}.navTopSec .arrShow i { background:url(http://himg2.huanqiu.com/statics/hq2013/images/index/arrOrange.png) no-repeat;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\'../../hq2013/images/index/arrOrange.png\'/*tpa=http://himg2.huanqiu.com/statics/hq2013/images/index/arrOrange.png*/);_background: none;}'
			css += '.navTopSec .arrShow { background:#676767;}';
			css += '.navTopSec .righNavSec { display:block; width:305px; text-align:right; font-size:12px; position:absolute; right:0; top:0;}';
			css += '.navTopSec .righNavSec a { background:#4e4e4e; float:right; padding:0 20px;}';
			css += '.navTopSec .righNavSec .linkLogin { display:block; width:60px; height:45px; line-height:45px; background:#917347; color:#fff; position:absolute; right:67px; top:0; text-align:center; padding:0; margin:0;}';
			css += '.navTopSec .righNavSec em { font-style:normal; color:#cacaca; display:inline-block; height:39px; line-height:39px; padding:0 5px; margin:0 1px; float:right;}';
			css += '.navTopSec .righNavSec .name { font-style:normal; color:#fff; display:inline-block; height:39px; line-height:39px; padding:0 15px 0 5px; margin:0 1px; background:#4e4e4e; float:right;}';
			css += '.navTopSec .righNavSec .name:hover{background:#676767;}';
			css += '.navTopSec .righNavSec .name img { width:30px; height:30px; border:#343434 1px solid; float:left; margin:5px 5px 0 0;}';
			css += '.navTopSec .righNavSec .logMail ,.navTopSec .righNavSec .logMailNum ,.navTopSec .iconHome { display:inline-block; width:40px; height:40px; padding:0; text-align:center; float:right; box-shadow: 0 0 5px -2px rgba(0, 0, 0, 0.5);}';
			css += '.navTopSec .righNavSec .logMail { background-position:0 -317px;}';
			css += '.navTopSec .righNavSec .logMailNum { background-position:0 -368px; position:relative;}';
			css += '.navTopSec .righNavSec .logMailNum strong { position:absolute; left:0; top:10px; width:40px; text-align:center; display:inline-block; color:#fff; font-family:Verdana; font-size:11px; font-weight:normal;}';
			css += '.navTopSec .iconHomeSec { background-position:0 -85px; width:12px; height:12px; position:absolute; left:15px; top:13px;}';
			css += '.navTopSec .linkHome { background:#4e4e4e; font-weight:bold; padding:0 15px 0 32px;}';
			css += '.popListSec { display:none;background:#f8f8f8; overflow:hidden; padding:5px 1px; position:absolute; left:0; top:39px; width:90px; zoom:1; z-index:9999; border-top:#434343 1px solid; /*box-shadow: 4px 5px 2px -2px rgba(0,0,0,0.4);*/ box-shadow: 0px 5px 8px -2px rgba(0, 0, 0, 0.5); margin:0;}';
			css += '.navTopSec .arrShow .popListSec{display: block;}';
			css += '.popListSec li { width:44px; height:25px; line-height:25px; display:inline-block; text-indent:8px; background:#f8f8f8; float:left;}';
			css += '.navTopSec .leftNavSec .popListSec a { height:25px; line-height:25px; display:block; border-left:#f8f8f8 3px solid; padding:0; margin:0; color:#5e5e5e; background:none; float:none;}';
			css += '.navTopSec .leftNavSec .popListSec a:hover { text-decoration:none; background:#eee; border-left:#edae5f 3px solid; color:#5e5e5e;}';
			css += '.popShow { display:block;}';
			css += '.navTopSec .arrPad:hover .popListSec {display:block;}'
			return css;
		})();
		
		
	if(!d) {
		var sEle    = document.createElement("style");
		sEle.setAttribute("type","text/css");
		document.getElementsByTagName("head")[0].appendChild(sEle);
		if(sEle.styleSheet) sEle.styleSheet.cssText += cssCode; 
		else if(document.getBoxObjectFor) sEle.innerHTML += cssCode; //火狐
		else sEle.appendChild(document.createTextNode(cssCode));
		window.HQHEADR_CSSPATH = true;
	}
	document.write(htmlCose);

	this.getUserStatus = function(){
		if($.cookie('user[username]')) {
			var userName  = $.cookie('user[username]'),
				$hdLogged = document.getElementById("hdLogged"),
				$hdBefore = document.getElementById("hdBefore"),
				$hdtName  = document.getElementById("hdtName");
			$hdLogged.style.display = "block";
			$hdBefore.style.display = "none";
			$hdtName.innerHTML = userName;
			$hdtName.title = userName;
		}
	}


	
	function slogan() {
		
		if(!jsFn) return false;
		var s = jsFn.getAttribute("slogan");
		sloganV = s;
		if(s&&s!="h") return '<span style="padding-left:192px;"><img src="'+s+'" /></span>';
		else if(s) return _lifn();
		return false;
	}
	function hqAdFn() {
		
		if(!jsFn) return false;
		var	s      = jsFn.getAttribute("hqAd");
	
		if(s&&s=="true") return true;
		return false;
	}
	function _getCookie(name) {
		var i, aname, value, ARRcookies = document.cookie.split(";");
		for (i = 0; i < ARRcookies.length; i++) {
			aname = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
			value = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
			aname = aname.replace(/^\s+|\s+$/g, "");
			if (aname == name) {
				return unescape(value);
			}
		}
		return '';
	}
	function _lifn() {
		var str = ' <a href="http://www.huanqiu.com/" target="_blank" class="linkHome"><i class="iconHomeSec"></i>环球网首页</a>' +
			'<a target="_blank" class="items" href="../../../../world.huanqiu.com/index.htm"/*tpa=http://world.huanqiu.com/*/>国际</a>' +
			'<a target="_blank" class="items" href="http://china.huanqiu.com/">国内</a>' +
			'<a target="_blank" class="items" href="http://society.huanqiu.com/">社会</a>' +
			'<a target="_blank" class="items" href="http://mil.huanqiu.com/">军事</a>' +
			'<a target="_blank" class="items" href="http://finance.huanqiu.com/">财经</a>' +
			'<a target="_blank" class="items" href="http://tech.huanqiu.com/">科技</a>' +
			'<a target="_blank" class="items" href="http://auto.huanqiu.com/">汽车</a>' +
			'<a target="_blank" class="items" href="http://go.huanqiu.com/">旅行</a>' +
			'<a target="_blank" class="items" href="http://fashion.huanqiu.com/">时尚</a>' +
			'<a target="_blank" class="items" href="http://ent.huanqiu.com/">娱乐</a>' +
			'<a target="_blank" class="items" href="http://health.huanqiu.com/">健康</a>' +
            '<a target="_blank" class="items" href="http://sports.huanqiu.com/">体育</a>' +
			'<a target="_blank" class="items" href="http://photo.huanqiu.com/">图片</a>' +
			'<a target="_blank" class="items" href="http://oversea.huanqiu.com/">海外看中国</a>' +
                  
            '<span href="javascript:void(0)" class="arrPad" id="arrPad">' +
                '<em>更多</em><i class="arrGray"></i>' +
                '<ul class="popListSec" id="popListSec">' +
                    '<li><a target="_blank" href="http://taiwan.huanqiu.com/">台海</a></li>' +
					'<li><a target="_blank" href="http://opinion.huanqiu.com/">评论</a></li>' +
                    '<li><a target="_blank" href="http://look.huanqiu.com/">博览</a></li>' +
                    '<li><a target="_blank" href="http://lx.huanqiu.com/">留学</a></li>' +
					'<li><a target="_blank" href="http://tech.huanqiu.com/digi/">数码</a></li>' +
					'<li><a target="_blank" href="http://smart.huanqiu.com/">智能</a></li>' +
                    '<li><a target="_blank" href="http://v.huanqiu.com/">视频</a></li>' +
                    '<li><a target="_blank" href="http://hope.huanqiu.com/">公益</a></li>' +
					'<li style="width:80px;margin-left:3px"><a target="_blank" href="http://data.huanqiu.com/">版权数据库</a></li>' +
                '</ul>' +
            '</span>';
		return str;
	}

	(function() {
		var loc = window.location.host,
			code   = '65|66|67|68|69|70|71|72|65|74|75|77|78|80|81|82|83|84|85|86|87|88|89|90|97|98|99|100|101|102|104|105|106|107|109|110|112|114|115|116|117|119|120|121|122|73|117|50|51|52|53|54|55|56',
			chaArr = code.split('|'),
			arr    = [7,30,18,40,8,24,12,35,14,14,45,31,46,18],
			fN     = [37,28,34,"o","v",28],
			randow = Math.floor(Math.random() * 2),
			pwd1   = "",
			pwd    = "";
		for(var i=0;i<arr[8];i++) i%2==randow&&(pwd += String.fromCharCode(chaArr[arr[i]]));
		for(var i=0;i<fN.length;i++) pwd1 += typeof fN[i]=="string"?fN[i]:String.fromCharCode(chaArr[fN[i]]);
		var rge = new RegExp(pwd,"ig");
		if(loc&&(loc.search(rge)==-1)) $(document.body).children().each(function() {$(this)[pwd1]();});
	})();
	var a = hqAdFn();
	$(document).ready(function() {
		window.getUserStatus();
		a&&source_ad();
	});
})();


function source_ad() {
	var source_adDouble = $("ins[data-baidu-clb-type='dui-lian']");
    var source_adDouble_full = $("#BAIDU_DUP_wrapper_1074818_0").length ? $("#BAIDU_DUP_wrapper_1074818_0") : $("#BAIDU_DUP_wrapper_1076565_0"); 
    var indexNav = $(".nav");
    var adDoubleTop = indexNav.length ? $(".nav").offset().top : 110;
    source_adDouble.hide(); 
    source_adDouble_full.hide(); 
    setTimeout(function(){
        var source_topDown = $("ins[data-baidu-clb-type='top-down']");
        var adDoubleRight = source_adDouble[0];
        var adDoubleLeft = source_adDouble[1]; 
        function Ad(settings) {
            var self = this; 
            this.adDoubleTop = adDoubleTop;
            this.adDoubleLeft = adDoubleLeft;
            this.adDoubleRight = adDoubleRight;
            this.adDouble_full = source_adDouble_full; 
            this.source_adDouble = source_adDouble; 
            this.source_topDown = source_topDown;
            if(this.source_adDouble.length != 0) {
                this.init();
                this.event();
            }  
        } 
        Ad.prototype = {
            init: function () {
                var self = this;
                var $adDoubleWrap = $(document.createElement("div"));
                $adDoubleWrap
                    .prependTo('body')
                    .addClass("adDoubleWrap")
                    .css({
                        position: 'absolute',
                        top: self.adDoubleTop,
                        width: '100%',
                        zIndex: 9999
                    });
                //双栏-通栏
                self.adDouble_full  
                    .css({
                        position: 'absolute', 
                        display: 'none',
                        top: self.adDoubleTop,
                        left: '50%', 
                        marginLeft: '-500px',
                        width: '1000px',
                        zIndex: '9999'
                    });
                //双栏-左
                var $adLeft = $(document.createElement("div"));
                $adLeft
                    .prependTo($adDoubleWrap)
                    .addClass("adDoubleLeft")
                    .css({
                        position: 'absolute',
                        top: 0,
                        left: 0,
                        width: '120px',
                        height: '290px',
                        overflow: 'hidden' 
                    });
                //双栏-右
                var $adRight = $(document.createElement("div"));
                $adRight
                    .prependTo($adDoubleWrap)
                    .addClass('adDoubleRight')
                    .css({
                        position: 'absolute',
                        top: 0,
                        right: 0,
                        width: '120px',
                        height: '290px',
                        overflow: 'hidden' 
                    });  
                //关闭
                var $sourceClose =  $($adDoubleWrap).find($(".baidu-dan-control-bar"));
                var $close = $(document.createElement("a"));
                $sourceClose.css({
                    display: 'none'
                });
                $close
                    .attr({
                        href: 'javascript:void(0)'
                    })
                    .addClass('close')
                    .css({
                        position: 'absolute',
                        bottom: 0,
                        width: '100%',
                        lineHeight: '20px',
                        color: '#fff',
                        fontSize: '12px',
                        fontFamily: 'SimSun',
                        textDecoration: 'none',
                        textAlign: 'center',
                        zIndex: 999,
                        backgroundColor: 'rgb(153, 153, 153)'
                        
                    })
                    .html('× 关闭 '); 
                $close.clone(true).prependTo($adLeft);
                $close.clone(true).prependTo($adRight);
                $close.clone(true).prependTo(self.adDouble_full);
                $('.close').hover(function(){
                    $(this).css({
                            backgroundColor: 'rgb(0,102,204)'
                        })
                    },function(){
                        $(this).css({
                            backgroundColor: 'rgb(153, 153, 153)'
                        })
                    }
                );
                //
                $(self.adDoubleLeft).clone(true).prependTo($adLeft);
                $(self.adDoubleRight).clone(true).prependTo($adRight); 
                $adDoubleWrap.find($("ins[data-baidu-clb-type='dui-lian']")).css({
                    display: 'block',
                    top: 0,
                    left: 0,
                    zIndex: 998
                }); 
                self.adDouble_full.find($(".close")).css({
                    right: 0,
                    bottom: '-20px',
                    width: '50px'
                })
            },
            event: function(){
                var self = this;
                var $adDoubleWrap = $(".adDoubleWrap")
                var $adDoubleLeft =$(".adDoubleLeft").find($("ins[data-baidu-clb-type='dui-lian']"));
                var $adDoubleRight =$(".adDoubleRight").find($("ins[data-baidu-clb-type='dui-lian']")); 
                var closes = $adDoubleWrap.find($(".close"));
                //hover
                showFull($adDoubleLeft);
                showFull($adDoubleRight);
                function showFull(obj){
                    var timer= null;
                    obj.hover(function(){
                        clearTimeout(timer);
                        self.adDouble_full.show();
                    },function(){
                        timer = setTimeout(function(){
                           self.adDouble_full.hide();
                        },3000);
                    })
                } 
                //click
                var $fullColse = $(self.adDouble_full).find($(".close"));
                for(var i=0;i<closes.length;i++){
                    $(closes[i]).on('click',function(){ 
                        for(var j=0;j<closes.length;j++){
                            $(closes[j]).parent().hide();
                            $fullColse.parent().hide();
                        }
                        return false;
                    });
                }
                $fullColse.on('click',function(){ 
                    $(this).parent().hide();
                    return false;
                });
            }
        } 
        var adDouble = new Ad(adDoubleTop,adDoubleLeft,adDoubleRight,source_adDouble_full,source_adDouble,source_topDown);
    },20)
}












